package com.qf.serevice.impl;

import com.qf.mapper.DoctorMapper;
import com.qf.entity.Doctor;
import com.qf.pojo.BaseResult;
import com.qf.serevice.DoctorService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Resource
    DoctorMapper doctorMapper;
    @Override
    //药房医生登录
    public BaseResult findDoctorBydIdcard(String dIdcard) {
        BaseResult baseResult = new BaseResult();
        Doctor doctor1 = doctorMapper.selectByIdCard(dIdcard);

        if (doctor1!=null){
               baseResult.setData(doctor1);
               baseResult.setInfo("查询成功！");
               baseResult.setCode(1);
               return baseResult;
        }else {
            baseResult.setCode(0);
            baseResult.setInfo("请重新登录");
            return baseResult;
        }

    }


}
